unit SQLError;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,
  wbLog;

type
  TfmSQLError = class(TForm)
    mmoSQL: TMemo;
    btnOk: TButton;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  procedure ShowError(SQLText: AnsiString);

implementation

{$R *.dfm}

procedure ShowError(SQLText: AnsiString);
var
  fmSQLError: TfmSQLError;
begin
  Log(SQLText);
  Log(#13#10#13#10#13#10);
  fmSQLError := TfmSQLError.Create(Application.MainForm);
  try
    fmSQLError.mmoSQL.Text := SQLText;
    fmSQLError.ShowModal;
  finally
    fmSQLError.Free;
  end;
end;

end.
